"use strict";

const Controller = require("egg").Controller;

class HomeController extends Controller {
  async index() {
    const { ctx } = this;
    await ctx.render("index.html");
  }

  async upload() {
    const { ctx } = this;
    const file = ctx.request.files[0];
    console.log(file.filepath);

    ctx.body = {
      msg: "upload ok",
    };
  }
}

module.exports = HomeController;
